Datalog for Static Analysis

نویسنده

  • Ben Greenman
چکیده

These are post-lecture notes for my February 7th presentation for HOPL 2017. The theme is the use of Datalog as a framework for building static analyses. The lecture covered the history of Datalog, who its original application to static analysis, and its later success. These notes are a bare-minimum transcription of my on-paper notes for the lecture. Better than nothing. Datalog for Static Analysis Last year, there were two new papers about an old domain-specific language. • From Datalog to Flix [14] at PLDI 2016 • Datafun: A Functional Datalog [4] at ICFP 2016 Both have a similar motivation, essentially: Datalog has been successful because it lies at a confluence between logic programming and static analysis. And both papers suggest new extensions for Datalog. The goal today is to understand why and how Datalog has been successful. To start, we’ll trace the papers’ citations. Both cite work regarding the LogicBlox Datalog engine: Flix cites the Doop program analyzer (for Java programs) [6] and Datafun cites a paper that summarizes the engine [3]. They also both cite Whaley and Lam’s bddbddb. Finally they each cite one early work on Datalog. Flix cites Ullman’s text on Principles of database and knowledgebase systems and Datafun cites the proceedings of a 1978 workshop on Logic and Databases, hosted by Gallaire, Minker, and Nicholas. (See Figure 1 for a picture of this paragraph. The solid lines represent citations in the 2016 papers.) At this point, the earliest cited work that ues Datalog to implement a static analysis is the bddbddb paper, from 2004. The bddbddb paper in turn cites work by Reps [17] that uses the Coral deductive database [16] (a Datalog database) to implement demand-driven program slicing. But the idea of Datalog for static analysis goes (at least!) one step further: to Uwe Aβmann’s dissertation work. That’s where we’ll start today. The road map is (1) Aβmann, (2) classic Datalog, (3) bddbddb, and (4) Doop. In terms of deltas and contributions, we’ll (1) see a uniform framework for expressing three static analyses, (2) rephrase that framework as Datalog, (3) see how context-sensitive points-to analysis turned Datalog from a novelty to a necessity, and (4) the power of a mature Datalog implementation. 1Ullman’s text demonstrates how Datalog can express and solve the reaching definitions problem, that is likely the first work to present the idea of implementing a static analysis with Datalog.

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Static Analysis of JAVA Programs in a Rule–based Framework

This paper presents a practical Java program analysis framework that is obtained by combining a Java virtual machine with a general–purpose verification toolbox that we previously extended. In our methodology, Datalog clauses are used to specify complex interprocedural program analyses involving dynamically created objects. After extracting an initial set of Datalog constraints about the Java B...

متن کامل

Precise complexity guarantees for pointer analysis via Datalog with extensions

Pointer analysis is a fundamental static program analysis for computing the set of objects that an expression can refer to. Decades of research has gone into developing methods of varying precision and efficiency for pointer analysis for programs that use different language features, but determining precisely how efficient a particular method is has been a challenge in itself. For programs that...

متن کامل

Static Analysis of Transactional IntensionalDatabasesExtended

This paper proposes a formal framework to statically analyze intensional databases modeling transactional behavior. The considered language is U-Datalog, an extension of Datalog modeling updates and transactions. The analysis, performed at compile time, provides information about certain types of situations that may arise at execution time such as aborts, inconsistencies and failures. These inf...

متن کامل

Extending Datalog with Analytics in LogicBlox

LogicBlox is a database product designed for enterprise software development, combining transactions and analytics. The underying data model is a relational database, and the query language, LogiQL, is an extension of Datalog [13]. As such, LogiQL features a simple and unified syntax for traditional relational manipulation as well as deeper analytics. Moreover, its declarative nature allows for...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 2017